package com.wyy.controller;

import com.wyy.common.Result;
import org.apache.shiro.authz.AuthorizationException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;


@RestControllerAdvice
public class ExceptionController {

    @ExceptionHandler(AuthorizationException.class)
    public Result _403(AuthorizationException e) {
        return new Result<>(Result.ResultStatus.NoPerm.code, e.getMessage());
    }

}
